package com.binyouwei.designpatterns.behavior.state;

public class StateMediaPlayer {
    private StatePlayerState state;

    public StateMediaPlayer() {
        state = new StatePausedState(); // 初始状态
    }

    public void setState(StatePlayerState state) {
        this.state = state;
    }

    public void play() {
        state.play();
    }

    public void pause() {
        state.pause();
    }

}
